package casa.depesos.app.com.http.data;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class Order implements Parcelable {

    @SerializedName("apsum")
    @Expose
    public String amount;

    @SerializedName("lref")
    @Expose
    public String no;

    @SerializedName("borrowID")
    @Expose
    public String id;

    @SerializedName("pdays")
    @Expose
    public String day;

    @SerializedName("outstanding")
    @Expose
    public String isOverDue;

    @SerializedName("totalOverdueDays")
    @Expose
    public String overDueDay;

    @SerializedName("manifest")
    @Expose
    public String status;

    @SerializedName("demandTime")
    @Expose
    public String time;


    protected Order(Parcel in) {
        amount = in.readString();
        no = in.readString();
        id = in.readString();
        day = in.readString();
        isOverDue = in.readString();
        overDueDay = in.readString();
        status = in.readString();
        time = in.readString();
    }

    public static final Creator<Order> CREATOR = new Creator<Order>() {
        @Override
        public Order createFromParcel(Parcel in) {
            return new Order(in);
        }

        @Override
        public Order[] newArray(int size) {
            return new Order[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(amount);
        dest.writeString(no);
        dest.writeString(id);
        dest.writeString(day);
        dest.writeString(isOverDue);
        dest.writeString(overDueDay);
        dest.writeString(status);
        dest.writeString(time);
    }
}
